<?php
/**
 * | @author 韩威兵^life <1877361302@qq.com>
 * +----------------------------------------------------------------------
 * | @copyright 2016 - 2019 HQ
 * +----------------------------------------------------------------------
 * | @version $Id: 2019/4/27 14:41 jiahe_new member.php 韩威兵^life $
 * +----------------------------------------------------------------------
 */

namespace app\api\validate;

use think\Validate;

class  Member extends Validate
{
    /**
     * @var array
     */
    protected $rule = [
        'nick_name'  => 'require|max:25',
        'open_id'   => 'require',
        //'union_id' => 'require',
        'phone' => 'length:11|isPhone:m',
        'sex' => 'number',
    ];
    /**
     * @var array
     */
    protected $message = [
        'nick_name.require' => '昵称必须存在',
        'nick_name.max'     => '昵称最多不能超过25个字符',
        'open_id.require'        => 'open id 必须有值',
        //'union_id.require'        => 'union id 必须有值',
        'phone.length'        => '手机号码长度有误',
        'phone.isPhone'        => '手机号码格式有误',
        'sex.number'        => '性别输入有误',
    ];

}